package com.gitee.qdbp.general.common.api.site.model.content;

import com.gitee.qdbp.able.model.reusable.ExtraData;
import com.gitee.qdbp.general.common.api.site.model.content.impl.ImageContentValue;
import com.gitee.qdbp.general.common.api.site.model.content.impl.RichtextContentValue;

/**
 * 内容
 *
 * @author zhh
 * @version 171012
 */
public class ContentValue extends ExtraData {

    /** 版本序列号 **/
    private static final long serialVersionUID = 1L;

    private RichtextContentValue richtext;

    private ImageContentValue image;

    public RichtextContentValue getRichtext() {
        return richtext;
    }

    public RichtextContentValue getRichtext(boolean force) {
        if (this.richtext == null && force) {
            this.richtext = new RichtextContentValue();
        }
        return richtext;
    }

    public void setRichtext(RichtextContentValue richtext) {
        this.richtext = richtext;
    }

    public ImageContentValue getImage() {
        return image;
    }

    public ImageContentValue getImage(boolean force) {
        if (this.image == null && force) {
            this.image = new ImageContentValue();
        }
        return image;
    }

    public void setImage(ImageContentValue image) {
        this.image = image;
    }

}
